home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 October / 1993-10.d64 / name machine (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  6KB  |  206 lines

  1. 10 rem copyright 1993 - compute publications intl ltd - all rights reserved
  2. 20 rt=0:ft=1:ft$(1)="[198]irst name [204]ast name":ft$(2)="[204]ast name, [198]irst name"
  3. 30 ft$(3)="[193]s is"
  4. 40 r$=chr$(13):nu=1:dimna$(350),og$(350):poke53280,15:poke53281,15:poke646,6
  5. 50 print"[147]            [158][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  6. 51 print" [192][192][192][192][192][192][192][192][192][192][192][179] [156][206][193][205][197][160][205][193][195][200][201][206][197] [158][171][192][192][192][192][192][192][192][192][192][192][192]";chr$(14)
  7. 52 print"            [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][156]"
  8. 55 print"[208][204][197][193][211][197] [197][206][212][197][210][160][206][213][205][194][197][210][160][207][198][160][211][197][204][197][195][212][201][207][206]"r$r$
  9. 60 print"1...[197]nter"r$r$;"2...[197]dit"r$
  10. 61 print"3...[208]rint"r$r$"4...[211]ave"r$r$"5...[204]oad"r$r$"6...[197]rase [193]ll [206]ames"
  11. 62 printr$"7...[195]hange [201]nput [198]ormat"
  12. 63 if ft=3 then print"    ([206]o names)":goto70
  13. 64 print "    ("ft$(ft)")"
  14. 70 geta$:ifa$<"1"ora$>"7"then70
  15. 80 a=val(a$):ona goto 100,300,600,800,900,1000,1100
  16. 100 e=0:print"[147][158]"tab(13)"[176][192][192][192][192][192][192][192][192][192][192][192][174]"
  17. 101 printtab(13)"[221] [156][206]ame #"nu tab(25)"[158][221]"
  18. 102 print"[158][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  19. 103 print"[212]ype [156][205] to [197]xit to main menu"
  20. 104 print"[212]ype [156][197] for [197]dit menu"
  21. 105 print"[156][197][206][212][197][210][160][206][193][205][197] ("ft$(ft)")"r$"? [164]";:d$=""
  22. 110 gosub1300
  23. 130 ifa$=""then100
  24. 131 ifa$="m"ora$="[205]"ora$="menu"then280
  25. 132 ifa$="d"ora$="[196]"then 500
  26. 133 if e=1 then gosub 290
  27. 134 if a$="e" or a$="[197]" or a$="edit" then rt=1:goto300
  28. 135 og$=a$
  29. 136 if ft=3 then na$=a$:goto200
  30. 138 if ft=2 then 170
  31. 140 a=len(a$):c=a:b=0
  32. 145 if mid$(a$,a,1)=" " then 160
  33. 150 a=a-1:b=b+1:ifa=0thenna$=a$:goto200
  34. 155 goto145
  35. 160 b$=right$(a$,b):c$=left$(a$,c-b):na$=b$+", "+c$:goto200
  36. 170 a=len(a$):c=a:b=1
  37. 175 if mid$(a$,b,1)= "," then 190
  38. 180 if b=a then na$=a$:goto200
  39. 185 b=b+1:goto175
  40. 190 b$=right$(a$,c-b):c$=left$(a$,(b-1)):og$=b$+" "+c$:na$=a$
  41. 200 d=1
  42. 205 rem printlenhr$(142)
  43. 210 ifd>nuthenna$(nu)=na$:og$(nu)=og$:goto260
  44. 220 ifna$>na$(d)thend=d+1:goto210
  45. 230 b=nu:fori=1tonu-d
  46. 240 na$(b)=na$(b-1):og$(b)=og$(b-1):b=b-1:next
  47. 250 na$(d)=na$:og$(d)=og$
  48. 260 nu=nu+1:printchr$(14):ife=1then458
  49. 270 goto100
  50. 280 ife=1thene=0:goto458
  51. 282 ifrt=1thenrt=0:goto100
  52. 285 goto50
  53. 290 na$(c)=na$(c+1):og$(c)=og$(c+1):ifc<nu then c=c+1:goto290
  54. 298 nu=nu-1:return
  55. 300 a=1
  56. 304 print"[147]      [156][208][204][197][193][211][197][160][211][197][204][197][195][212][160][206][213][205][194][197][210][160][212][207][160][197][196][201][212][158]"
  57. 305 print"     [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  58. 306 if nu<=20 then 309
  59. 308 print"[200][201][212] [156][210][197][212][213][210][206] [212][207][160][195][207][206][212][201][206][213][197][160][204][201][211][212][201][206][199]"
  60. 309 print"[212]ype [156][205] to [197]xit to main menu"
  61. 310 fori=1to20
  62. 320 ifa<=9thenprint" ";a;na$(a):a=a+1:goto327
  63. 325 printa;na$(a):a=a+1:c=0
  64. 327 next:c=0
  65. 330 print"? [164]";:d$=""
  66. 331 getz$:ifz$=""then331
  67. 332 ifz$=chr$(13)orz$=chr$(141)thena$=d$:goto340
  68. 333 iflen(d$)=0andz$=chr$(20)then331
  69. 334 ifz$=chr$(20)thend$=left$(d$,len(d$)-1):print"[157] [157]"z$"[164]";
  70. 335 ifz$<" "orz$>chr$(130)andz$<chr$(160)then331
  71. 336 iflen(z$)>3then331
  72. 338 if z$="m" or z$="[205]" or z$="menu"then282
  73. 339 d$=d$+z$:print"[157]"z$"[164]";:goto331
  74. 340 if a$=""then370
  75. 350 b=val(a$)
  76. 355 ifb<=0orb>=nuthenfori=0tolen(a$):print"[157] [157]";:next:print"[164]";:d$="":goto331
  77. 360 goto400
  78. 370 ifa>=nuthena=1:goto304
  79. 380 goto 304
  80. 398 goto134
  81. 400 print"[147][212]ype [156][196] to delete name"
  82. 410 print"[212]ype [156][205] to return to menu"
  83. 420 print"[207][204][196][160][197][206][212][210][217]--"na$(b)
  84. 430 print"[156][212][217][208][197][160][201][206][160][206][197][215][160][197][206][212][210][217] ([204]ast name, [198]irst name)"r$r$"? [164]";
  85. 450 e=1:q=nu:tf=ft:d$="":c=b
  86. 453 if ft=3 then 110
  87. 455 ft=2:goto110
  88. 458 nu=q:ft=tf:e=0:if rt=1 then rt=0:goto100
  89. 459 goto300
  90. 500 printr$r$"[193]re [217]ou [211]ure? ([217]/[206])"
  91. 510 get a$:ifa$=""then510
  92. 520 ifa$="[206]"ora$="n"then e=0:nu=q:ft=tf:goto300
  93. 530 gosub290:goto300
  94. 600 print"[147][156]     [212]ype [205] to return to main menu[158]"
  95. 605 print"     [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]
  96. 608 [153]"(NULL)rint clrascirst or clr(NULL)ast name first?";
  97. 610 [161] a$:[139]a$[179][177]"f"[175]a$[179][177]"asc"[175]a$[179][177]"l"[175]a$[179][177]"(NULL)"[175]a$[179][177]"m"[175]a$[179][177]"(NULL)"[167] 610
  98. 615 [139]a$[178]"m"[176]a$[178]"(NULL)"[167]50
  99. 620 [153]a$:a[178]1:[139]a$[178]"f"[176]a$[178]"asc"[167] a[178]0
  100. 626 [153]r$"(NULL)umber (NULL)ist of (NULL)ames? ((NULL)/(NULL))";
  101. 627 [141]797
  102. 628 [139]a$[178]"m"[176]a$[178]"(NULL)"[167]50
  103. 629 [153]a$:d[178]1:[139]a$[178]"y"[176]a$[178]"(NULL)"[167] d[178]0
  104. 630 [153]r$"atnre you using (NULL)ingle (NULL)heets? ((NULL)/(NULL))";
  105. 631 [141]797
  106. 632 [153]a$:o[178]1:[139]a$[178]"y"[176]a$[178]"(NULL)"[167] o[178]0
  107. 635 [153]r$"(NULL)umber of lines peeketween (NULL)ames (0-3)?";
  108. 636 [161]a$:[139]a$[179]"0"[176]a$[177]"3"[167]636
  109. 637 f[178][197](a$):[153]f
  110. 641 [139](nu[172](f[170]1))[179]55[167]645
  111. 642 [153]r$"(NULL)rint in (NULL)wo columns? ((NULL)/(NULL))"
  112. 643 [141]797
  113. 644 p[178]0:[139] a$[178]"y"[176]a$[178]"(NULL)"[167]p[178]1
  114. 645 [153]r$"(NULL)ype (NULL)itle: to";:d$[178]"":[141]1300:b$[178]a$
  115. 646 [153]r$"clr(NULL)(NULL)val(NULL)(NULL)closeatn(NULL)(NULL)close(NULL)val(NULL)close(NULL)(NULL)closepeekvalchr$right$(NULL)close(NULL)(NULL)right$(NULL)(NULL)right$(NULL)chr$"
  116. 647 [153]"(NULL)o lenancel press (NULL)wait"
  117. 648 [161]a$:[139]a$[178]""[167]648
  118. 649 [139] a$[178]"q"[167]50
  119. 650 [159] 4,4,7:g[178][181]([195](b$)[173]2):[152]4,r$
  120. 651 [129]i[178]1[164](40[171]g):[152]4," ";:[130]:[152]4,b$r$r$
  121. 655 [139]p[178]1[167]700
  122. 656 [129]i[178]1[164]nu
  123. 657 [161]a$:[139]a$[178]"q"[167]50
  124. 658 [139]m[179][178]55[167]666
  125. 659 m[178]1:[139] o[178]1 [167] 664
  126. 660 [153]"load(NULL)(NULL)val(NULL)(NULL)closeatn(NULL)(NULL)close(NULL)val(NULL)close(NULL)(NULL)closelen(NULL)(NULL)(NULL)right$(NULL)(NULL)val"
  127. 661 [153]"(NULL)o lenancel press (NULL)wait"
  128. 662 [161]a$:[139]a$[178]""[167]662
  129. 663 [153]"load": [152]4,r$,r$,r$:[137]666
  130. 664 [129]b[178]1[164]5:[152]4,r$:[130]b
  131. 666 [139] d[178]0[175]i[179][178]9[167][152]4," ";i;:[137]669
  132. 667 [139] d[178]0[167][152]4,i;
  133. 669 [139] a[178]0[167] [152]4,og$(i):[137]680
  134. 670 [139] a[178]1[167] [152]4,na$(i)
  135. 680 [139]f[177]0[167][129]q[178]1[164]f:[152]4,"":m[178]m[170]1:[130]q
  136. 682 m[178]m[170]1:[130]:[160]4:[137]50
  137. 700 m[178]1:q[178]1:i[178]1:ln[178][181](55[173](f[170]1)):[139]f[177]0[167] ln[178]ln[170]1
  138. 705 k[178]i:[139]i[177]nu[167][160]4:[137]50
  139. 708 [161]a$:[139]a$[178]"q"[167][160]4:[137]50
  140. 710 [139]m[179][178]ln[167]745
  141. 715 m[178]1:i[178]i[170]ln:k[178]i:q[178]1:[139] o[178]1 [167] 740
  142. 720 [153]"load(NULL)(NULL)val(NULL)(NULL)closeatn(NULL)(NULL)close(NULL)val(NULL)close(NULL)(NULL)closelen(NULL)(NULL)(NULL)right$(NULL)(NULL)val"
  143. 725 [153]"(NULL)o lenancel press (NULL)"
  144. 730 [161]a$:[139]a$[178]""[167]730
  145. 735 [153]"load":[152]4,r$,r$,r$:[137]745
  146. 740 [129]b[178]1[164]10:[152]4,"":[130]b
  147. 745 [139] d[178]0[175]k[179][178]9[167][152]4,"   ";k;:[137]755
  148. 750 [139] d[178]0[167][139]na$(k)[179][177]""[167][152]4,"  ";k;
  149. 755 [139] a[178]0[167] [152]4,og$(k);:[137]765
  150. 760 [139] a[178]1[167] [152]4,na$(k);
  151. 765 [139] q[178]0[167]780
  152. 775 k[178]i[170]ln:[129]j[178]1[164]40[171]([195](na$(i))[170]3):[152]4," ";:[130]j:q[178]0:[137]745
  153. 780 k[178]i:q[178]1
  154. 790 [129]qa[178]0[164]f:[152]4,"":[130]qa
  155. 795 m[178]m[170]1:i[178]i[170]1:[137]705
  156. 797 [161] a$:[139] a$[179]